package com.example.bms.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.bms.entity.Teacher;
import java.util.List;


/**
 * @apiNote 教师的增删改查
 * @author 杨雨恒
 * @email 1627856348@qq.com
 * @since 1.0.0
 */
public interface TeacherService {


    /**
     * @apiNote 查询所有教师
     * @param page 页数
     * @author 杨雨恒
     * @email 1627856348@qq.com
     * @return ApiResult
     * @since 1.0.0
     */
    IPage<Teacher> findAll(Page<Teacher> page);


    /**
     * @apiNote 查询所有教师
     * @author 杨雨恒
     * @email 1627856348@qq.com
     * @return IPage<Teacher>
     * @since 1.0.0
     */
    public List<Teacher> findAll();


    /**
     * @apiNote 根据teacherId查询某一教师所有信息
     * @author 杨雨恒
     * @param teacherId 教师id
     * @email 1627856348@qq.com
     * @return ApiResult
     * @since 1.0.0
     */
    public Teacher findById(Integer teacherId);


    /**
     * @apiNote 根据教师id删除对应老师
     * @author 杨雨恒
     * @param teacherId 教师id
     * @email 1627856348@qq.com
     * @return int类型，受影响的条数
     * @since 1.0.0
     */
    public int deleteById(Integer teacherId);


    /**
     * @apiNote 根据教师id修改对应老师信息
     * @param teacher
     * @author 杨雨恒 教师实体类
     * @email 1627856348@qq.com
     * @return int类型，受影响的条数
     * @since 1.0.0
     */
    public int update(Teacher teacher);


    /**
     * @apiNote 增加老师
     * @author 杨雨恒
     * @email 1627856348@qq.com
     * @return int类型，受影响的条数
     * @since 1.0.0
     */
    public int add(Teacher teacher);
}
